set(CMAKE_SYSTEM_NAME Windows)
set(MUDDY_TOOLCHAIN_PREFIX x86_64-w64-mingw32- CACHE STRING
		"Cross compiling toolchain prefix, must ends with a dash(-)")
set(CMAKE_C_COMPILER ${MUDDY_TOOLCHAIN_PREFIX}gcc)
set(CMAKE_CXX_COMPILER ${MUDDY_TOOLCHAIN_PREFIX}g++)
set(CMAKE_RC_COMPILER ${MUDDY_TOOLCHAIN_PREFIX}windres)

execute_process(COMMAND sh find_root_path.sh ${MUDDY_TOOLCHAIN_PREFIX}gcc
		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake
		OUTPUT_VARIABLE CMAKE_FIND_ROOT_PATH
		OUTPUT_STRIP_TRAILING_WHITESPACE)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
